package com.rd.sys.common;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author admin
 * Created time 2019/12/30 10:44
 */
public class TimeUtil {

    public static String getHourMinuteSecond(long timeMillis) {
        String re = "";
        int timezone = 8; // 时区
        long totalSeconds = timeMillis / 1000;
        totalSeconds += 60 * 60 * timezone;
        int second = (int) (totalSeconds % 60);// 秒
        long totalMinutes = totalSeconds / 60;
        int minute = (int) (totalMinutes % 60);// 分
        long totalHours = totalMinutes / 60;
        int hour = (int) (totalHours % 24);// 时
        hour = hour-8;
        if (hour < 10){
            re += "0"+hour;
        }
        if (minute < 10){
            re += ":0"+minute;
        }
        if (second < 10){
            re += ":0"+second;
        }

        return re;
    }
    public static void main(String[] args) {
        System.out.println(getHourMinuteSecond(69000L));
    }
}
